<template>
  <div>
    <div class="primary" @click="openConfirm">点击打开确认框</div>
    <confirm ref="confirm" @confirm="confirmClick" text="是否确认这个操作"></confirm>

  </div>
</template>

<script>
import Confirm from "base/confirm/confirm";
export default {
  data() {
    return {
      render: (h) => {
        return h('div', {
            style:{
                color:'red'
            }
        },'自定义内容');
      }
    };
  },
  methods: {
    openConfirm() {
      this.$refs.confirm.show();
    },
    confirmClick() {
      console.log("点击了确认");
    }
  },
  components: {
    Confirm
  }
};
</script>

<style lang="stylus" rel="stylesheet/stylus">
.primary {
  width: 150px;
  padding: 10px 0;
  border: 1px solid #333;
  border-radius: 2px;
}
</style>
